package legoLab07;

import lejos.nxt.Button;
import lejos.nxt.SensorPort;
import lejos.nxt.SoundSensor;


public class Vehicle1 {
	SoundSensor s1 = new SoundSensor(SensorPort.S4);
	public static void main(String[] args) {
		new Vehicle1();
	}
	
	public Vehicle1(){
		while(!Button.ESCAPE.isPressed()){
			Car.forward(readSound(), readSound());
		}
		
	}
	private int readSound(){
		return s1.readValue();
	}
}
